package tau.pimpmyfreedb.main;

import java.io.IOException;

import org.ini4j.InvalidFileFormatException;

import tau.pimpmyfreedb.GUI.SWTUtil;
import tau.pimpmyfreedb.master.IPimpMaster;
import tau.pimpmyfreedb.master.PimpMaster;

public class Main {

    /**
     * @author Alon Bar, Yonatan Erez, Oren Gafni, Abir Yassin
     * 
     * @param args -
     *                not needed
     * 
     * @throws IOException
     * @throws InvalidFileFormatException
     */
    public static void main(String[] args) {

	// config file path
	String path = "config/PimpConfig.ini";

	// create an instance of PimpMaster - the main entry point for the
	// program
	IPimpMaster app = null;
	try {
	    app = new PimpMaster(path);
	} catch (Exception e) {
	    e.printStackTrace();
	    SWTUtil.errorBox(e);
	}
	try {
	    // launch the program
	    if (app != null)
		app.startApplication();
	} catch (Exception e) {
	    e.printStackTrace();
	}

	System.exit(0);
    }
}
